﻿using System;
using System.Web.UI.WebControls;
using Controller;

public partial class Listtour : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            BindDataListTour();
        }
    }
    public void BindDataListTour()
    {
        var controller = new VYC01Controller();
        var model = controller.GetAllList();

        gvListtour.DataSource = model;
        gvListtour.DataBind();

    }
    protected void gv_PageIndexChanging(object sender, GridViewPageEventArgs e)
    {
        gvListtour.PageIndex = e.NewPageIndex;
        BindDataListTour();
    }
    protected void gv_Sorting(object sender, GridViewSortEventArgs e)
    {
        BindDataListTour();
    }
}